﻿using TMS.Dal;
using TMS.Model;

namespace TMS.Bll
{
    public class Membll
    {
        public Membll(Memdal memdal)
        {
            Memdal = memdal;
        }

        public Memdal Memdal { get; }
        /// <summary>
        /// 登录
        /// </summary>
        /// <param name="name"></param>
        /// <param name="pwd"></param>
        /// <returns></returns>
        public Admin Login(string name, string pwd)
        {
            try
            {
               return Memdal.Login(name, pwd);
            }
            catch (Exception)
            {

                throw;
            }

        }
      
        /// <summary>
        /// 显示加查询
        /// </summary>
        /// <param name="name"></param>
        /// <param name="age"></param>
        /// <returns></returns>
        public List<Member> GetMembers(string? name, string? age)
        {
            try
            {
               return Memdal.GetMembers(name, age);
            }
            catch (Exception)
            {

                throw;
            }

        }
    }
}
